using IcsSEMCtrl.Event.Device;
using System;
namespace Lifter.Event.Lifter
{
    [Serializable]
    public class ConveyorBufferEvent : DeviceEvent
    {
        public enum ConveyorBufferEventType
        {
            INIT = 1,
            CSTPRESENCE
        }
        public static readonly string CLASS = "ConveyorBufferEvent";
        public static readonly string SPECIFIC_SUBJECT = "ConveyorBuffer";
        public new static readonly string SUBJECT = DeviceEvent.SUBJECT + "." + ConveyorBufferEvent.SPECIFIC_SUBJECT;
        private string conveyorBufferId;
        private ConveyorBufferEvent.ConveyorBufferEventType bufferEvent;
        public string ConveyorBufferId
        {
            get
            {
                return this.conveyorBufferId;
            }
            set
            {
                this.conveyorBufferId = value;
            }
        }
        public ConveyorBufferEvent.ConveyorBufferEventType BufferEvent
        {
            get
            {
                return this.bufferEvent;
            }
            set
            {
                this.bufferEvent = value;
            }
        }
        public ConveyorBufferEvent(string deviceId, string deviceType, string bufferId, ConveyorBufferEvent.ConveyorBufferEventType bufferEvent) : base(deviceId, deviceType)
        {
            this.conveyorBufferId = bufferId;
            this.bufferEvent = bufferEvent;
            base.SetSubject(this.CreateSubject(bufferId));
        }
        protected new string CreateSubject(string id)
        {
            return ConveyorBufferEvent.FormSubject(id);
        }
        public new static string FormSubject(string id)
        {
            return ConveyorBufferEvent.SUBJECT + "." + id;
        }
    }
}
